export const typeOptions = [
    {value: 1, label: '文本', type: 'primary'},
    {value: 2, label: '图片', type: 'info'},
]

export const fields = [
    {
        prop: 'avatar',
        label: '发送用户头像',
        type: 'image',
        width: 120,
    },
    {
        prop: 'sessionId',
        label: '所属会话',
        type: 'number',
        width: 120,
    },
    {
        prop: 'senderId',
        label: '所属发送用户',
        type: 'number',
        width: 120,
    },
    {
        prop: 'name',
        label: '发送用户名称',
        type: 'text',
        search: true,
        width: 170,
    },
    {
        prop: 'content',
        label: '消息内容',
        type: 'longtext',
        width: 'auto',
    },
    {
        prop: 'type',
        label: '消息类型',
        type: 'switch',
        options: typeOptions,
        search: true,
        width: 170,
    },
    {
        prop: 'createTime',
        label: '创建时间',
        type: 'datetime',
        formHidden: true,
        width: 190,
    }
]